function sum(a:number,...args:number[]):number{
    console.log('args: ', args)
    console.log(arguments)
    return a + args.reduce((pre,cur)=>pre + cur, 0)

}

sum(1,2,3,4,5,6)

